package com.heima.cloud.clients.fallback;

import com.heima.cloud.clients.UserFeignApi;
import com.heima.cloud.pojo.User;
import org.springframework.stereotype.Component;

@Component
public class UserFeignApiFallBack implements UserFeignApi {

    /**
     * feign降级方法
     * @param username
     * @return User
     */
    @Override
    public User queryById(String username) {
        User user=new User();
        user.setName("服务暂停"+username);
        return user;
    }
}
